<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>子代选择器</title>
    <style>
        /* div的儿子span文字颜色是红色 */
        div>span{
            color:red;
        }
    </style>
</head>
<body>
    <div>
        <span>这是div里面的 span</span>
        <p>
            <span>这是div里面的p里面的span</span>
        </p>
    </div>
</body>
</html>